<?php
/***************************************************************************
 * 
 * Copyright (c) 2010 , Inc. All Rights Reserved
 * $Id$:funcs.conf.php,2010/05/18 12:44:06 
 * 
 **************************************************************************/
 
 
 
/**
 * @file funcs.conf.php
 * @author huqingping
 * @date 2010/05/18 12:44:06
 * @version 1.0 
 * @brief 
 *  
 **/

Conf::set('hapn.debug', 'manual');
//记录代码覆盖率日志
//日志文件位置在tmp/cov下
Conf::set('hapn.logcov', false);//
Conf::set('hapn.log.file','HapN');
Conf::set('hapn.log.level',16);
Conf::set('hapn.log.request', 'request.log');
Conf::set('hapn.view','ZendView');
Conf::set('hapn.encodeinput',true);

Conf::set('hapn.error.redirect', array(
	'hapn.error'=>'http://www?w=error',
	'hapn.u_notfound'=>'http://www?w=notfound',
	'hapn.u_login'=>'http://login/?login&tpl=cc&tpl_reg=cc&u=[url]',
	//使用jump案例
	//'hapn.u_login'=>'http://tc-jp-test00.tc./?login&tpl=cc&tpl_reg=cc&u=http%3A%2F%2Fbb-eb-mall-test01.bb01.%3A8080%2Fjump%3Furi%3D[url]%26domain%3Dhttp%3A%2F%2Fwww.youa.com%2F',
	'hapn.u_power'=>'http://www?w=power'
));
Conf::set('hapn.error.retrycode', '/\.net_/');
Conf::set('hapn.error.retrymax', 2);
Conf::set('hapn.error.userreg', '/\.u_/');

//实际单元测试时不应该加载此配置
//* 
Conf::set('hapn.filter.init',array(/*'DumpLogFilter'*/));
Conf::set('hapn.filter.input',array('IPAuthFilter'/*,'CSRFFilter'*/));
Conf::set('hapn.filter.clean',array());
//*/

Conf::set('hapn.encoding','UTF-8');
//Conf::set('hapn.ie','GBK');
//Conf::set('hapn.oe','GBK');
//


Conf::set('db.conf',array(
	'text_db'=>'demo',
    'text_table'=>'t_text',
    'text_compress_len'=>1,
    'max_text_len'=>65535,
	//1是取模分表
    'splits'=>array('t_text'=>array('text_id',array(1=>10))),
    'log_func'=>'Logger::trace',
    'test_mode'=>0,
	'guid_db'=>'demo',
	'guid_table'=>'t_guid',
	'db_pool'=>array(
		'ip1'=>array('ip'=>'192.168.0.220','user'=>'root','pass'=>'root','port'=>3306,'charset'=>'utf-8'),
	),
	'dbs'=>array(
	/*
		'demo'=>array(
			'master'=>'ip1','slave'=>array('ip1')
		)
	*/
		'demo'=>'ip1'
	)
));
Conf::set('db.readonly', false);

//apiproxy 配置
Conf::set('apiproxy.servers',array(
        'permission'=>array(
	        'isweb'=>1,
	        'ignore_leading_crlf'=>false,
	        'curlopt'=>array(
	            CURLOPT_TIMEOUT =>5,
	            CURLOPT_CONNECTTIMEOUT=>1,
	        ),
	
	        'servers'=>array(
	           '10.65.18.73:6688',
	           '10.65.18.75:6688',
	        ))
	     )
);
        
$nocheckconf =	array('class'=>'HttpJsonProxy','server'=>'voteserver','checkret'=>false);
Conf::set('apiproxy.mod',array(
	
	'vote'=>$nocheckconf,
    'showmall'=>array('class'=>'HttpRpcProxy','server'=>'voteserver'),
));
//ApiProxy::getProxy('as')
Conf::set('apiproxy.intercepters',array(
//	'UserActionIntercepter',
	));
//默认curl的配置
Conf::set('curl.options',array(
		//seconds
		CURLOPT_TIMEOUT =>5,
		CURLOPT_CONNECTTIMEOUT=>1,
));



/* vim: set ts=4 sw=4 sts=4 tw=100 noet: */
?>
